package database

import (
	"fmt"
	"gorm.io/driver/sqlite"
	"gorm.io/gorm"
)

var db *gorm.DB

func init() {
	db, _ = gorm.Open(sqlite.Open("./database.db"), &gorm.Config{})
	err := db.AutoMigrate(&TaskList{})
	if err != nil {
		fmt.Println("迁移数据库错误：", err)
	}
}
